home *** CD-ROM | disk | FTP | other *** search
/ MacWarehouse Macintosh Games / MacWarehouse Macintosh Games.iso / AMBER demo / ROXY / ROXY.dxr / 00023_bar icon --.ls < prev    next >
Encoding:
Text File  |  1996-10-18  |  2.3 KB  |  66 lines

  1. on mouseDown
  2.   global oPuppeteer, oStoryteller, gPeekPlayList, gCPU
  3.   set pkScanIcon to 41
  4.   set pkBarIcon to 42
  5.   set pkAmberIcon to 43
  6.   set peekText to 40
  7.   if getState(oStoryteller, #houseLightsAreOn) = 0 then
  8.     set peekVideo to getProp(the lsForegroundData of oPuppeteer, #PkVideoDark)
  9.   else
  10.     set peekVideo to getProp(the lsForegroundData of oPuppeteer, #PkVideoNormal)
  11.   end if
  12.   resetPeeKdisplay()
  13.   if getState(oStoryteller, #BarOnline) = 1 then
  14.     set the castNum of sprite 42 to getAt(getProp(the lsMultiFrames of oPuppeteer, #barIcon), 4)
  15.   end if
  16.   set textList to getProp(the lsMultiFrames of oPuppeteer, #peekText)
  17.   set stateMsg to value("#bar" & getState(oStoryteller, #PKbarStatus))
  18.   set the castNum of sprite 40 to getProp(textList, stateMsg)
  19.   soundEffect(#peekButton)
  20.   if gCPU = #PC then
  21.     suspendSounds()
  22.   end if
  23.   updateStage()
  24.   if getState(oStoryteller, #BarOnline) = 1 then
  25.     set camSprite to 44
  26.     set bailOut to 0
  27.     repeat while the mouseDown
  28.       updateStage()
  29.     end repeat
  30.     repeat with myClip in gPeekPlayList
  31.       set clipNum to getaProp(peekVideo, myClip)
  32.       if voidp(clipNum) then
  33.         put ">‚Ä¢> Sorry, there's no clip available for #" & myClip
  34.         put ">‚Ä¢> AMBERVISION is " & getState(oStoryteller, #AMBERVISION)
  35.         put ">‚Ä¢> Are the house lights on? [" & getState(oStoryteller, #houseLightsAreOn) & "]"
  36.         exit
  37.       end if
  38.       set the movieRate of sprite camSprite to 0
  39.       set the castNum of sprite camSprite to clipNum
  40.       updateStage()
  41.       set the movieTime of sprite camSprite to 0
  42.       set the movieRate of sprite camSprite to 1
  43.       set totalTime to the duration of cast clipNum
  44.       repeat while the movieTime of sprite camSprite < totalTime
  45.         if stateMsg = #barnoActivity then
  46.           if the mouseDown then
  47.             set bailOut to 1
  48.             set textList to getProp(the lsMultiFrames of oPuppeteer, #peekText)
  49.             set the castNum of sprite peekText to getProp(textList, #none)
  50.             resetPeeKdisplay()
  51.             exit repeat
  52.           end if
  53.         end if
  54.         updateStage()
  55.       end repeat
  56.       if bailOut = 1 then
  57.         exit repeat
  58.       end if
  59.     end repeat
  60.   end if
  61.   buildDefaultPlaylist()
  62.   if getState(oStoryteller, #BarOnline) then
  63.     setProp(the lsStateData of oStoryteller, #PKbarStatus, [#noActivity])
  64.   end if
  65. end
  66.